<!DOCTYPE html>
<html>
<head>
    <title>Basic usage</title>
    <meta http-equiv="X-UA-Compatible" content="IE=edge" >

    <link href="../../content/shared/styles/examples-offline.css" rel="stylesheet">
    <link href="../../../styles/kendo.dataviz.min.css" rel="stylesheet">

    <script src="../../../js/jquery.min.js"></script>
    <script src="../../../js/kendo.dataviz.min.js"></script>
    <script src="../../content/shared/js/console.js"></script>
</head>
<body>
    <a class="offline-button" href="../index.html">Back</a>
    
        <div id="example" class="k-content">
            <div class="chart-wrapper">
                <div id="chart" style="background: center no-repeat url('../../content/shared/styles/world-map.png');"></div>
            </div>
            <script>
                function createChart() {
                    $("#chart").kendoChart({
                        title: {
                            position: "bottom",
                            text: "Share of Internet Population Growth, 2007 - 2012"
                        },
                        legend: {
                            visible: false
                        },
                        chartArea: {
                            background: ""
                        },
                        seriesDefaults: {
                            labels: {
                                visible: true,
                                background: "transparent",
                                template: "#= category #: #= value#%"
                            }
                        },
                        series: [{
                            type: "pie",
                            startAngle: 150,
                            data: [{
                                category: "Asia",
                                value: 53.8,
                                color: "#9de219"
                            },{
                                category: "Europe",
                                value: 16.1,
                                color: "#90cc38"
                            },{
                                category: "Latin America",
                                value: 11.3,
                                color: "#068c35"
                            },{
                                category: "Africa",
                                value: 9.6,
                                color: "#006634"
                            },{
                                category: "Middle East",
                                value: 5.2,
                                color: "#004d38"
                            },{
                                category: "North America",
                                value: 3.6,
                                color: "#033939"
                            }]
                        }],
                        tooltip: {
                            visible: true,
                            format: "{0}%"
                        }
                    });
                }

                $(document).ready(function() {
                    setTimeout(function() {
                        // Initialize the chart with a delay to make sure
                        // the initial animation is visible
                        createChart();

                        $("#example").bind("kendo:skinChange", function(e) {
                            createChart();
                        });
                    }, 400);
                });
            </script>
        </div>

</body>
</html>
